const Arborist = require('@npmcli/arborist')
const packlist = require('npm-packlist')

async function getPackList(packageDir) {
  const arborist = new Arborist({ path: packageDir })
  return await arborist.loadActual().then((tree) => packlist(tree))
}

module.exports = {
  getPackList
}
